# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: éclairevoyant
# Contributor: endlesseden <eden at rose dot place>
pkgname=fast_float
pkgver=5.3.0
pkgrel=1
pkgdesc='Fast and exact implementation of the C++ from_chars functions for float and double types'
arch=('any')
url="https://github.com/fastfloat/$pkgname"
license=('Apache' 'Boost' 'MIT')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
b2sums=('ae5e694229f6b876179ec7b6e36a7faeaf08f6b698ba18564d12c48ea306041eadce0bc85e09ad203b43f38b194258209fa4fbb497a961e9bc729f604099ed63')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX='/usr'
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname-$pkgver/LICENSE* -t "$pkgdir/usr/share/licenses/$pkgname/"
}
